<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2020/7/8
  Time: 11:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%
    //获取项目名称
    String path = request.getContextPath();
    //获取: 协议://服务器名称:/端口号+ path +"/"
    //http://localhost:8080/Demo18_StuAndTeacher/  --->main.jsp
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <title>Title</title>
    <%--base标签设置页面的默认地址/默认目标资源--%>
    <base href="<%=basePath%>">
</head>
<style type="text/css">
    html, body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        background-image: linear-gradient(to bottom, #243949 0%, #517fa4 100%);
        overflow: hidden;
    }

    .div_body {
        height: 400px;
        width: 30%;
        margin: 10% auto;
        position: relative;
        background: #fff;
        border-radius: 6px;
        z-index: 2;
    }
    #_body {
        width: 100%;
        text-align: center;
    }
    .msg{
        padding-top: 20px;
        color: #374b5d;
        height: 40px;
    }
    table{
        margin: 0 10%;
        width: 100%;
        height: 75%;
    }
    table tr{
        width: 100%;
        height: 15%;
    }
    table tr td{
        font-size: 20px;
        width: 100%;
    }
    .input{
        width: 80%;
        height: 55%;
        border-radius: 10px;
        text-align: center;
        font-size: 15px;
        border:1px solid #ccc;
        color: #ccc;

    }
    .btn {
        color: #ffffff;
        background-color: #40586d;
        border-color: #374b5d;
        width:20%;
        height: 30px;
        margin-right: 8%;
    }
    .check{
        width: 13%;

    }
</style>


<script type="text/javaScript">
    function checked(obj) {

    }
</script>
<body>
<div class="div_body">
    <div id="_body">
        <h3 class="msg" style="cursor:default">${msg }</h3>
        <form action="servletLogin" method="post"
              onsubmit="return checked(this)">
            <table>
                <tr>
                    <td><input class="input" type="text" name="num" placeholder="账号">
                    </td>
                </tr>
                <tr>
                    <td><input class="input" type="password" name="pwd" placeholder="密码">
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="check" type="radio" name="role" value="0" checked="checked">学生
                        <input class="check" type="radio" name="role" value="1">教师
                        <input class="check" type="radio" name="role" value="2">管理员
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="btn" type="submit" value="登录">
                        <input class="btn" type="button" name="register" value="注册"
                               onclick="window.open('register.jsp')">
                        <input class="btn" type="reset" value="取消">
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
</body>
</html>
